
							*=================================================*
							* Economic Interventions, Evaluations and Trust   *
							* Devine/Turnbull-Dugarte						  *
							*=================================================*
							
									**********************************
									**  STUDY 2 - APPENDIX MATERIAL **
									**********************************
							
clear							
use "/Users/stuartturnbulldugarte/Dropbox/Interventions & Trust/STU/GESIS_eurobarometers.dta", clear




													***************
													**  TABLE A9 **
													***************

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)


estpost sum swd_new perecon_new unemp_change debt_change deficit_change interest_change intervention year if e(sample)
est store descr, title("Descriptives")
esttab descr using TableA9.tex, replace  ///
  cells("count(l(Count)) mean(fmt(2) l(Mean)) sd(fmt(2) l(Sd)) min(l(Min)) max(l(Max))")
  
  

													*****************
													**  FIGURE A12 **
													*****************
													
gen intervention2=intervention
replace intervention2=1 if cntryID==380 & year>=2011
//Controlling unemployment
//FULL
**indirect
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ame_full

**total
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention] + _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ate_full

**direct
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention], post
estimates store ade_full

//without Greece
**indirect
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=300, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ame_noG

**total
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=300, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention] + _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ate_noG

**direct
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=300, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention], post
estimates store ade_noG

//without Spain
**indirect
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=724, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ame_noS

**total
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=724, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention] + _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ate_noS

**direct
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=724, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention], post
estimates store ade_noS

//without Portugal
**indirect
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=620, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ame_noP

**total
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=620, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention] + _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ate_noP

**direct
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=620, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention], post
estimates store ade_noP

//without Ireland
**indirect
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=372, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ame_noI

**total
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=372, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention] + _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ate_noI

**direct
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=372, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention], post
estimates store ade_noI

//without Cyprus
**indirect
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=19601, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ame_noC

**total
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=19601, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention] + _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ate_noC

**direct
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1 & cntryID!=19601, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention], post
estimates store ade_noC


//plus Italy
**indirect
gsem (perecon_new -> swd_new, ) (i.intervention2 -> swd_new, ) (i.intervention2 -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:1.intervention2], post
estimates store ame_it

**total
gsem (perecon_new -> swd_new, ) (i.intervention2 -> swd_new, ) (i.intervention2 -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention2] + _b[swd_new:perecon_new]*_b[perecon_new:1.intervention2], post
estimates store ate_it

**direct
gsem (perecon_new -> swd_new, ) (i.intervention2 -> swd_new, ) (i.intervention2 -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention2], post
estimates store ade_it



coefplot ate_full ate_noG ate_noS ate_noP ate_noI ate_noC ate_it || ame_full ame_noG ame_noS ame_noP ame_noI ame_noC ame_it || ade_full ade_noG ade_noS ade_noP ade_noI ade_noC ade_it, keep(_nl_1) vertical yline(0) ci(99 95) byopts(row(1)) ylabel(0.2(0.2)-0.6) yscale(range(0.2(0.2)-0.6)) legend(row(2)) mlabel format(%9.2g) mlabposition(2) mlabgap(*2) xlabel("")
graph save FigureA2.gph, replace
graph export FigureA12.pdf, replace


													*****************
													**  FIGURE A13 **
													*****************

///Controlling for GDP change////
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (realgdpgr_change -> swd_new, ) (realgdpgr_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ame4

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (realgdpgr_change -> swd_new, ) (realgdpgr_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention] + _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ate4

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (realgdpgr_change -> swd_new, ) (realgdpgr_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention], post
estimates store ade4

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (realgdpgr_change -> swd_new, ) (realgdpgr_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:realgdpgr_change], post
estimates store ame4_gdp

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (realgdpgr_change -> swd_new, ) (realgdpgr_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:realgdpgr_change] + _b[swd_new:perecon_new]*_b[perecon_new:realgdpgr_change], post
estimates store ate4_gdp

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (realgdpgr_change -> swd_new, ) (realgdpgr_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:realgdpgr_change], post
estimates store ade4_gdp

///Controlling for Kriesi misery index///
factor unemp_change debt_change realgdpgr
sumscale, f1(unemp_change debt_change realgdpgr)
rename Factor1_average misery
label var misery "Economic misery"

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (misery -> swd_new, ) (misery -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ame5

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (misery -> swd_new, ) (misery -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention] + _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ate5

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (misery -> swd_new, ) (misery -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention], post
estimates store ade5

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (misery -> swd_new, ) (misery -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:misery], post
estimates store ame5_misery

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (misery -> swd_new, ) (misery -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:misery] + _b[swd_new:perecon_new]*_b[perecon_new:misery], post
estimates store ate5_misery

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (misery -> swd_new, ) (misery -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:misery], post
estimates store ade5_misery


///Controlling for labour costs///
merge 1:1 cntryID year using labourfile.dta

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (lab -> swd_new, ) (lab -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ame6

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (lab -> swd_new, ) (lab -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention] + _b[swd_new:perecon_new]*_b[perecon_new:1.intervention], post
estimates store ate6

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (lab -> swd_new, ) (lab -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention], post
estimates store ade6

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (lab -> swd_new, ) (lab -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:lab], post
estimates store ame6_lab

gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (lab -> swd_new, ) (lab -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:lab] + _b[swd_new:perecon_new]*_b[perecon_new:lab], post
estimates store ate6_lab


gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (lab -> swd_new, ) (lab -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:lab], post
estimates store ade6_lab

coefplot ate4_gdp ate5_misery ate6_lab ||  ame4_gdp ame5_misery ame6_lab || ade4_gdp ade5_misery ame6_lab, keep(_nl_1) vertical yline(0) ci(99 95) byopts(row(1)) ylabel(0.02(0.02)-0.04) yscale(range(0.02(0.02)-0.04)) legend(row(1)) xlabel("")
graph save FigureA13.gph, replace
graph export FigureA13.pdf, replace




													*****************
													**  FIGURE A14 **
													*****************

//MODELS CONSIDERING COUNTRIES WITH INTERVENTIONS PRIOR TO EUROZONE CRISIS\\
gen intervention_prebailout=intervention
replace intervention_prebailout=1 if cntry==348 & year>2008 //Hungary Deember 2008
replace intervention_prebailout=1 if cntry==428 & year>2008 //Latvia December 2008
replace intervention_prebailout=1 if cntry==642 & year>2008 //Romania June 2009

twoway (connected swd_new year if cntry==300 & year>2004) (connected swd_new year if cntry==724 & year>2004) (connected swd_new year if cntry==348 & year>2004) (connected swd_new year if cntry==428 & year>2004) (connected swd_new year if cntry==642 & year>2004), scheme(538w) ytitle("SWD (1-4)") xtitle("Year") legend(position(top) row(2) label(1 "Greece") label(2 "Spain") label(3 "Hungary") label(4 "Latvia") label(5 "Romania")) xline(2010, lcolor(538b)) xline(2011.5, lcolor(538r)) xline(2008.25, lcolor(538g)) xline(2008.5, lcolor(538y)) xline(2008.75, lcolor(538m)) caption("Vertical lines indicate year of country's intervention") title("Trends in SWD among pre- and post-Eurozone crisis interevned-in countries")
graph save FigureA14.gph, replace
graph export FigureA14.pdf, replace


													*****************
													**  FIGURE A15 **
													*****************
**indirect
gsem (perecon_new -> swd_new, ) (i.intervention_prebailout -> swd_new, ) (i.intervention_prebailout -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:1.intervention_prebailout], post
estimates store ame

**total
gsem (perecon_new -> swd_new, ) (i.intervention_prebailout -> swd_new, ) (i.intervention_prebailout -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention_prebailout] + _b[swd_new:perecon_new]*_b[perecon_new:1.intervention_prebailout], post
estimates store ate

**direct
gsem (perecon_new -> swd_new, ) (i.intervention_prebailout -> swd_new, ) (i.intervention_prebailout -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention_prebailout], post
estimates store ade

//Effects of unemployment
**indirect
gsem (perecon_new -> swd_new, ) (i.intervention_prebailout -> swd_new, ) (i.intervention_prebailout -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:unemp_change], post
estimates store ame_u

**total
gsem (perecon_new -> swd_new, ) (i.intervention_prebailout -> swd_new, ) (i.intervention_prebailout -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:unemp_change] + _b[swd_new:perecon_new]*_b[perecon_new:unemp_change], post
estimates store ate_u

**direct
gsem (perecon_new -> swd_new, ) (i.intervention_prebailout -> swd_new, ) (i.intervention_prebailout -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:unemp_change], post
estimates store ade_u

coefplot (ate, label(EU intervention)) (ate_u, label(Δ Unemployment (%)) msymbol(D)) || ame  ame_u || ade ade_u,  keep(_nl_1) vertical yline(0, lcolor(black)) ci(99 95) byopts(row(1)) ylabel(0.2(0.2)-0.6) yscale(range(0.2(0.2)-0.6)) legend(row(1)) mlabel format(%9.2g) mlabposition(2) mlabgap(*2) xlabel("") ytitle("Effect on SWD (1-4)") bylabels("ATE" "AME" "ADE") scheme(538w) plotregion(lcolor(black))
graph save FigureA15.gph, replace
graph export FigureA15.pdf, replace


													*****************
													**  FIGURE A16 **
													*****************

*Controlling for unemployment
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
outreg2 using FigureA16.tex, dec(2) replace drop(i.cntryID year) addtext(Country FE, Yes, Year trends, Yes)
*Controlling for deficit
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (deficit_change -> swd_new, ) (deficit_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
outreg2 using FigureA16.tex, dec(2) append drop(i.cntryID year) addtext(Country FE, Yes, Year trends, Yes)
*Controlling for debt
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (debt_change -> swd_new, ) (debt_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
outreg2 using FigureA16.tex, dec(2) append drop(i.cntryID year) addtext(Country FE, Yes, Year trends, Yes)

*Controlling for interest
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (interest_change -> swd_new, ) (interest_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
outreg2 using FigureA16.tex, dec(2) append drop(i.cntryID year) addtext(Country FE, Yes, Year trends, Yes)

													*****************
													**  FIGURE A17 **
													*****************
													
//Restimating models applying clustered SES//
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(cluster cntryID)
outreg2 using FigureA17.tex, dec(2) replace drop(i.cntryID year) addtext(Country FE, Yes, Year trends, Yes)

*Controlling for deficit
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (deficit_change -> swd_new, ) (deficit_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(cluster cntryID)
outreg2 using FigureA17.tex, dec(2) append drop(i.cntryID year) addtext(Country FE, Yes, Year trends, Yes)

*Controlling for debt
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (debt_change -> swd_new, ) (debt_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(cluster cntryID)
outreg2 using FigureA17.tex, dec(2) append drop(i.cntryID year) addtext(Country FE, Yes, Year trends, Yes)

*Controlling for interest
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (interest_change -> swd_new, ) (interest_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(cluster cntryID)
outreg2 using FigureA17.tex, dec(2) append drop(i.cntryID year) addtext(Country FE, Yes, Year trends, Yes)

													*****************
													**  FIGURE A18 **
													*****************
													
//Table with electionyear control

**Creating dummy var for election-years**
gen electionyear=0
replace electionyear=1 if cntryID==40 & year==2013 //Austria
replace electionyear=1 if cntryID==40 & year==2008 //Austria
replace electionyear=1 if cntryID==40 & year==2006 //Austria
replace electionyear=1 if cntryID==40 & year==2010 //Austria PRES


replace electionyear=1 if cntryID==56 & year==2014 //Belgium
replace electionyear=1 if cntryID==56 & year==2010 //Belgium
replace electionyear=1 if cntryID==56 & year==2007 //Belgium

replace electionyear=1 if cntryID==100 & year==2014 //Bulgaria
replace electionyear=1 if cntryID==100 & year==2013 //Bulgaria
replace electionyear=1 if cntryID==100 & year==2009 //Bulgaria
replace electionyear=1 if cntryID==100 & year==2005 //Bulgaria
replace electionyear=1 if cntryID==100 & year==2011 //Bulgaria PRES
replace electionyear=1 if cntryID==100 & year==2006 //Bulgaria PRES



replace electionyear=1 if cntryID==191 & year==2015 //Croatia BOTH
replace electionyear=1 if cntryID==191 & year==2011 //Croatia
replace electionyear=1 if cntryID==191 & year==2007 //Croatia
replace electionyear=1 if cntryID==191 & year==2010 //Croatia PRES


replace electionyear=1 if cntryID==203 & year==2013 //Czech Rep BOTH
replace electionyear=1 if cntryID==203 & year==2012 //Czech Rep
replace electionyear=1 if cntryID==203 & year==2010 //Czech Rep
replace electionyear=1 if cntryID==203 & year==2006 //Czech Rep
replace electionyear=1 if cntryID==203 & year==2008 //Czech Rep PRES


replace electionyear=1 if cntryID==208 & year==2015 //Denmark
replace electionyear=1 if cntryID==208 & year==2011 //Denmark
replace electionyear=1 if cntryID==208 & year==2007 //Denmark
replace electionyear=1 if cntryID==208 & year==2005 //Denmark

replace electionyear=1 if cntryID==233 & year==2015 //Estonia
replace electionyear=1 if cntryID==233 & year==2011 //Estonia
replace electionyear=1 if cntryID==233 & year==2007 //Estonia

replace electionyear=1 if cntryID==246 & year==2015 //Finland
replace electionyear=1 if cntryID==246 & year==2011 //Finland
replace electionyear=1 if cntryID==246 & year==2007 //Finland
replace electionyear=1 if cntryID==246 & year==2006 //Finland PRES
replace electionyear=1 if cntryID==246 & year==2012 //Finland PRES


replace electionyear=1 if cntryID==250 & year==2007 //France BOTH
replace electionyear=1 if cntryID==250 & year==2012 //France BOTH


replace electionyear=1 if cntryID==276 & year==2005 //Germany
replace electionyear=1 if cntryID==276 & year==2009 //Germany
replace electionyear=1 if cntryID==276 & year==2013 //Germany

replace electionyear=1 if cntryID==300 & year==2007 //Greece
replace electionyear=1 if cntryID==300 & year==2009 //Greece
replace electionyear=1 if cntryID==300 & year==2012 //Greece
replace electionyear=1 if cntryID==300 & year==2015 //Greece

replace electionyear=1 if cntryID==348 & year==2006 //Hungary
replace electionyear=1 if cntryID==348 & year==2010 //Hungary
replace electionyear=1 if cntryID==348 & year==2014 //Hungary

replace electionyear=1 if cntryID==372 & year==2011 //Ireland BOTH
replace electionyear=1 if cntryID==372 & year==2007 //Ireland

replace electionyear=1 if cntryID==380 & year==2006 //Italy
replace electionyear=1 if cntryID==380 & year==2008 //Italy
replace electionyear=1 if cntryID==380 & year==2013 //Italy

replace electionyear=1 if cntryID==428 & year==2006 //Latvia
replace electionyear=1 if cntryID==428 & year==2010 //Latvia
replace electionyear=1 if cntryID==428 & year==2011 //Latvia
replace electionyear=1 if cntryID==428 & year==2014 //Latvia

replace electionyear=1 if cntryID==440 & year==2009 //Lithu PRES
replace electionyear=1 if cntryID==440 & year==2014 //Lithu PRES
replace electionyear=1 if cntryID==440 & year==2008 //Lithu
replace electionyear=1 if cntryID==440 & year==2012 //Lithu

replace electionyear=1 if cntryID==442 & year==2009 //Luxembourg
replace electionyear=1 if cntryID==442 & year==2013 //Luxembourg

replace electionyear=1 if cntryID==470 & year==2008 //Malta
replace electionyear=1 if cntryID==70 & year==2013 //Malta

replace electionyear=1 if cntryID==528 & year==2006 //Netherlands
replace electionyear=1 if cntryID==528 & year==2010 //Netherlands
replace electionyear=1 if cntryID==528 & year==2012 //Netherlands

replace electionyear=1 if cntryID==616 & year==2005 //Poland BOTH
replace electionyear=1 if cntryID==616 & year==2007 //Poland
replace electionyear=1 if cntryID==616 & year==2011 //Poland
replace electionyear=1 if cntryID==616 & year==2015 //Poland BOTH
replace electionyear=1 if cntryID==616 & year==2010 //Poland PRES

replace electionyear=1 if cntryID==620 & year==2005 //Portugal
replace electionyear=1 if cntryID==620 & year==2006 //Portugal PRES
replace electionyear=1 if cntryID==620 & year==2009 //Portugal
replace electionyear=1 if cntryID==620 & year==2011 //Portugal BOTH
replace electionyear=1 if cntryID==620 & year==2015 //Portugal

replace electionyear=1 if cntryID==642 & year==2009 //Romania PRES
replace electionyear=1 if cntryID==642 & year==2014 //Romania PRES
replace electionyear=1 if cntryID==642 & year==2008 //Romania
replace electionyear=1 if cntryID==642 & year==2012 //Romania

replace electionyear=1 if cntryID==703 & year==2009 //Slovakia PRES
replace electionyear=1 if cntryID==703 & year==2014 //Slovakia BOTH
replace electionyear=1 if cntryID==703 & year==2006 //Slovakia 
replace electionyear=1 if cntryID==703 & year==2010 //Slovakia 
replace electionyear=1 if cntryID==703 & year==2012 //Slovakia 

replace electionyear=1 if cntryID==705 & year==2007 //Slovenia PRES
replace electionyear=1 if cntryID==705 & year==2012 //Slovenia PRES
replace electionyear=1 if cntryID==705 & year==2008 //Slovenia
replace electionyear=1 if cntryID==705 & year==2011 //Slovenia
replace electionyear=1 if cntryID==705 & year==2014 //Slovenia

replace electionyear=1 if cntryID==724 & year==2008 //Spain
replace electionyear=1 if cntryID==724 & year==2011 //Spain
replace electionyear=1 if cntryID==724 & year==2015 //Spain

replace electionyear=1 if cntryID==752 & year==2006 //Sweden
replace electionyear=1 if cntryID==752 & year==2010 //Sweden
replace electionyear=1 if cntryID==752 & year==2014 //Sweden

replace electionyear=1 if cntryID==826 & year==2005 //UK
replace electionyear=1 if cntryID==826 & year==2010 //UK
replace electionyear=1 if cntryID==826 & year==2015 //UK
 
replace electionyear=1 if cntryID==19601 & year==2008 //Cyprus PRES
replace electionyear=1 if cntryID==19601 & year==2013 //Cyprus PRES
replace electionyear=1 if cntryID==19601 & year==2006 //Cyprus
replace electionyear=1 if cntryID==19601 & year==2011 //Cyprus


*Controlling for unemployment
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (i.electionyear -> swd_new, ) (i.electionyear -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
outreg2 using FigureA18.tex, dec(2) replace drop(i.cntryID year) addtext(Country FE, Yes, Year trends, Yes)


*Controlling for deficit
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (i.electionyear -> swd_new, ) (i.electionyear -> perecon_new, ) (deficit_change -> swd_new, ) (deficit_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
outreg2 using FigureA18.tex, dec(2) append drop(i.cntryID year) addtext(Country FE, Yes, Year trends, Yes)

*Controlling for debt
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (i.electionyear -> swd_new, ) (i.electionyear -> perecon_new, )(debt_change -> swd_new, ) (debt_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
outreg2 using FigureA18.tex, dec(2) append drop(i.cntryID year) addtext(Country FE, Yes, Year trends, Yes)

*Controlling for interest
gsem (perecon_new -> swd_new, ) (i.intervention -> swd_new, ) (i.intervention -> perecon_new, ) (i.electionyear -> swd_new, ) (i.electionyear -> perecon_new, ) (interest_change -> swd_new, ) (interest_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
outreg2 using FigureA18.tex, dec(2) append drop(i.cntryID year) addtext(Country FE, Yes, Year trends, Yes)


											*****************
											**  FIGURE A19 **
											*****************


//MODELS RELYING ON MEASURE OF INTERVENTION THAT INCLUDES EXIT FROM THE PROGRAMME\\
gen intervention_timed=intervention
replace intervention_timed=0 if cntryID==372 & year>2013 //IE exit from bailout
replace intervention_timed=0 if cntryID==620 & year>2014 //PT exit from bailout
replace intervention_timed=0 if cntryID==724 & year>2013 //ESP exit from bailout
replace intervention_timed=0 if cntryID==19601 & year>2015 //CYP exit from bailout
replace intervention_timed=0 if cntryID==300 & year>2015 //GREEK exit from bailout


//Effects of intervention
**indirect
gsem (perecon_new -> swd_new, ) (i.intervention_timed -> swd_new, ) (i.intervention_timed -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:1.intervention_timed], post
estimates store ame

**total
gsem (perecon_new -> swd_new, ) (i.intervention_timed -> swd_new, ) (i.intervention_timed -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention_timed] + _b[swd_new:perecon_new]*_b[perecon_new:1.intervention_timed], post
estimates store ate

**direct
gsem (perecon_new -> swd_new, ) (i.intervention_timed -> swd_new, ) (i.intervention_timed -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:1.intervention_timed], post
estimates store ade

//Effects of unemployment
**indirect
gsem (perecon_new -> swd_new, ) (i.intervention_timed -> swd_new, ) (i.intervention_timed -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:perecon_new]*_b[perecon_new:unemp_change], post
estimates store ame_u

**total
gsem (perecon_new -> swd_new, ) (i.intervention_timed -> swd_new, ) (i.intervention_timed -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:unemp_change] + _b[swd_new:perecon_new]*_b[perecon_new:unemp_change], post
estimates store ate_u

**direct
gsem (perecon_new -> swd_new, ) (i.intervention_timed -> swd_new, ) (i.intervention_timed -> perecon_new, ) (unemp_change -> swd_new, ) (unemp_change -> perecon_new, )(year -> swd_new, ) (year -> perecon_new, ) (i.cntryID -> swd_new, )  (i.cntryID -> perecon_new, ) if eumember==1, nocapslatent vce(robust)
nlcom _b[swd_new:unemp_change], post
estimates store ade_u

coefplot (ate, label(EU intervention)) (ate_u, label(Δ Unemployment (%)) msymbol(D)) || ame  ame_u || ade ade_u,  keep(_nl_1) vertical yline(0, lcolor(black)) ci(99 95) byopts(row(1)) ylabel(0.2(0.2)-0.6) yscale(range(0.2(0.2)-0.6)) legend(row(1)) mlabel format(%9.2g) mlabposition(2) mlabgap(*2) xlabel("") ytitle("Effect on SWD (1-4)") bylabels("ATE" "AME" "ADE") scheme(538w) plotregion(lcolor(black))
graph save FigureA19.gph, replace
graph export FigureA19.pdf, replace
 
											*****************
											**  FIGURE A20 **
											*****************
  

clear
use "/Users/stuartturnbulldugarte/Dropbox/Interventions & Trust/PSRM_replication/eb75.3_2011.dta", clear

drop if v6 == 33 | v6 == 31 | v6 == 35 | v6 == 43 | v6 == 34 // drop non-EU countries.
replace v6 = 4 if v6 == 14 // merge East/West DE
replace v6 = 9 if v6 == 10 // merge GB/NI

keep if v6 == 13 // keep if Portugal

gen treated = 1 if v651 > 11 // keep if interviewed after intervention date (i.e treated)
replace treated = 0 if v651 < 12
tab treated

recode v310 (2=0) (1=1), generate (trust_govt) // trust govt
recode v311 (2=0) (1=1), generate (trust_plt) // trust parliament
recode v312 (2=0) (1=1), generate (trust_eu) // trust eu

tab trust_plt treated, col nofreq

gen placebo = 1 if v651 >= 7 // median of the control group, including treated
replace placebo = 0 if v651 <7

gen placebo2 = 1 if v651 >= 7 & treated !=1 // median of control group, excluding treated
replace placebo2 = 0 if v651 < 7 & treated !=1

gen placebo3 = 1 if v651 >= 6 & treated !=1 // 6th day, excluding treated
replace placebo3 = 0 if v651 < 6 & treated !=1

gen placebo4 = 1 if v651 >= 5 & treated !=1 // 5th day, excluding treated
replace placebo4 = 0 if v651 < 5 & treated !=1


rename v651 day // day of interview

rename v709 region // region of portugal

/* Variables are recoded so that positive coefficients would equal positive effect on evaluations */

recode v140 (1=4) (2=3) (3=2) (4=1), gen(econ_index) /* variable summarises answers to v127/140. As from the documentation:
						Respondents coded 1 or 2 in V114 or V120 and coded 1 in V127 or V134 are coded 1 ("Satisfied and confident") in the index variable. 
						Respondents coded 3 or 4 in V114 or V120 and coded 1 in V127 or V134 are coded 2 ("Unsatisfied and confident") in the index variable. 
						Respondents coded 1 or 2 in V114 or V120 and coded 2 in V127 or V134 are coded 3 ("Satisfied and worried") in the index variable. 
						Respondents coded 3 or 4 in V114 or V120 and coded 2 in V127 or V134 are coded 4 ("Unsatisfied and worried") in the index variable. 
						Respondents coded 5 in V114 or V120 or coded 3 or 4 in V127 or V134 are coded 5 ("INAP") in the index variable. */

recode v127 (1=3) (2=1) (3=2), gen(econ_expec) /* What are your expectations for the next twelve months: will the next twelve months be better, worse or the same, when it comes to...?
												The economic situation in [Our Country]. 1 = better, 2 = worse, 3 = same, 4 = DK */

recode v114 (1=4) (2=3) (3=2) (4=1), gen(econ_evals) /* How would you judge the current situation in each of the following?
						The situation of the [nationality] economy? 1= VG 2= Rather G 3= RB 4= VB 5 = DK */

rename v616 age
rename v614 education
rename v752 occupation
rename v615 gender

label variable treated "Treatment"
label define treated 0 "Control" 1 "Treated"
label values treated treated

label variable age "Age (years)"
label variable education "Education"
label variable occupation "Occupation"

gen running = day - 11

gsem (treated -> econ_evals, ) (treated -> trust_plt, ) (econ_evals -> trust_plt, ) (i.education -> econ_evals, ) (i.education -> trust_plt, ) (gender -> econ_evals, ) (gender -> trust_plt, ) (i.occupation -> econ_evals, ) (i.occupation -> trust_plt, ) (age -> econ_evals, ) (age -> trust_plt, ), nocapslatent
nlcom _b[trust_plt:econ_evals]*_b[econ_evals:treated], post
estimates store ame


gsem (treated -> econ_evals, ) (treated -> trust_plt, ) (econ_evals -> trust_plt, ) (i.education -> econ_evals, ) (i.education -> trust_plt, ) (gender -> econ_evals, ) (gender -> trust_plt, ) (i.occupation -> econ_evals, ) (i.occupation -> trust_plt, ) (age -> econ_evals, ) (age -> trust_plt, ), nocapslatent
nlcom _b[trust_plt:treated] + _b[trust_plt:econ_evals]*_b[econ_evals:treated], post
estimates store ate

gsem (treated -> econ_evals, ) (treated -> trust_plt, ) (econ_evals -> trust_plt, ) (i.education -> econ_evals, ) (i.education -> trust_plt, ) (gender -> econ_evals, ) (gender -> trust_plt, ) (i.occupation -> econ_evals, ) (i.occupation -> trust_plt, ) (age -> econ_evals, ) (age -> trust_plt, ), nocapslatent
nlcom _b[trust_plt:treated], post
estimates store ade

coefplot ate || ame  || ade, keep(_nl_1) vertical yline(0, lcolor(black)) byopts(row(1)) mlabel format(%9.2g) mlabposition(2) mlabgap(*2) xlabel("")  ytitle("Effect on Trust in Parliament (0-1)")  bylabels("ATE" "AME" "ADE") scheme(538bw) plotregion(lcolor(black))  ci(95 90)
graph save FigureA20.gph, replace
graph export FigureA20.pdf, replace

